clf


lw=1;
fs=22;
hold on


plot([0 1], [0 .3], 'LineWidth', lw)
plot([.2 1], [0 .7], 'LineWidth', lw) 
[a1 b1] = lineThrough2Points(0, 0, 1, .3)
[a2 b2] = lineThrough2Points(.2, 0, 1, .7)
    z1 = [-a1 1; -a2 1] \ [b1 b2]'
    plot([0 z1(1)], [0 z1(2)], 'LineWidth', 4) 

plot([.4 1], [0 .9], 'LineWidth', lw) 
[a1 b1] = lineThrough2Points(.4, 0, 1, .9)
    z2 = [-a1 1; -a2 1] \ [b1 b2]'
    plot([z1(1) z2(1)], [z1(2) z2(2)], 'LineWidth', 4) 

plot([.8 1], [0 .5], 'LineWidth', lw) %b2
    %last line x=1
    z3 = [-a1 1; 1 0] \ [b1 1]'
    plot([z3(1) z2(1)], [z3(2) z2(2)], 'LineWidth', 4) 

%xlabel('v', 'FontSize', fs);
xlabel('$\theta$', 'Interpreter','latex', 'FontSize', fs)
%ylabel('u(v,a_j,h)', 'FontSize', fs);
ylabel('$\hat{u}(\theta,a_j,h)$', 'Interpreter','latex', 'FontSize', fs)
set(gca,'FontSize',18);
set(gca,'YTick',[]);
set(gca,'XTick',[0 z1(1) z2(1) 1]);
%grid on
set(gca,'XTickLabel', {'0','c1','c2','1'})

fs=18
text(.95, .23, 'a_1', 'FontSize', fs)
text(.95, .52, 'a_2', 'FontSize', fs)
text(.95, .73, 'a_3', 'FontSize', fs)
text(.95, .94, 'a_4', 'FontSize', fs)

%name = '../papers/complementarities/img/envlinear';
name = 'C:\Users\User\Documents\synch\southampton\auctions\google\results\GRAPHS\envlinear'
% name = 'C:\Users\me\Documents\synch\southampton\auctions\google\results\GRAPHS\envlinear'
print('-depsc',strcat(name, '.eps'));
print('-dpdf',strcat(name, '.pdf'));
